home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbwinfnt.zip
/
EX_DCHAR.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-03-01
|
1KB
|
33 lines
REM: EX_DCHAR.BAS, Unregistered Version 1.0
REM: Example of using DispChar to display characters.
DECLARE SUB DispChar (Char%, FClr%, BClr%, X%, Y%, FontArray%())
DECLARE SUB LoadRsrcFileFont (FlName$, FontNum%, FontArray%(), RetCode%, RetMsg$)
'...setup a VGA screen mode...
SCREEN 12
'...dim array for font data (use REDIM so its DYNAMIC)...
REDIM FontArray%(1)
PRINT : PRINT "Loading a font from SAMPLE.FON..."
'...load the font in the example FON file...
CALL LoadRsrcFileFont("SAMPLE.FON", 1, FontArray%(), RetCode%, RetMsg$)
'...check return code, catches non-existent file...
IF (RetCode% <> 0) THEN STOP
'...display an "A" in foreground and background color...
CALL DispChar(ASC("A"), 4, 7, 100, 100, FontArray%())
'...display a "B" in foreground color only...
CALL DispChar(ASC("B"), 4, -1, 100, 130, FontArray%())
'...display a "C" in background color only...
CALL DispChar(ASC("C"), -1, 7, 100, 160, FontArray%())
END